<?php 
//print_r($HttpResult);
if(1==2){$HttpResult = new HttpResult();}
	
	  $HttpContentResult = $HttpResult->getHttpContentResult();
//	  Debug::print_r($HttpResult);
	  //$lang = Config::DEFAULT_LOCALE;
		$head = new HtmlHeader($HttpContentResult->getHeader());
		$head->addCSS('reset');
		$head->addCSS('print','', 'print');
		$head->addCSS('ie',  'css/ie', 'print',true);
		
		$head->addCSS('forum',"css/admin");		
		
		//<!-- PROGRAMACAO JS | JQUERY  -->
		$head->addJS(array('jquery', 'masked'));
		
	    //MENU DROPDOWN
	    $head->addJS('Menu principal','js/menu/ddsmoothmenu');
	    $head->addCSS('Menu CSS','js/menu/ddsmoothmenu');
	    
	    //TINYMCE
	    $head->addJS('tinymce','js/tinymce/jquery.tinymce');
	  	
		//<!-- JQUERY UI  -->
		$head->addJS('UI', 'js/UI/js/jquery-ui-1.8.6.custom.min');
		$head->addCSS('UI','js/UI/css/smoothness/jquery-ui-1.8.6.custom');

		//<!-- VTIP  -->
		$head->addJS('vtip', 'js/vtip/vtip');
		$head->addCSS('vtip', 'js/vtip/vtip');
		
		//<!-- TABLE SORTER -->
		$head->addJS('tablesorter', 'js/tablesorter/tablesorter');
		$head->addCSS('tablesorter', 'js/tablesorter/tablesorter');
		
		
    
    //<!-- PROGRAMACAO JS | JQUERY  -->
//    $head->addJS(array('utils/validation', '/admin/client/insert', 'admin_select','admin'));
    $head->addJS(array('utils/validation', 'admin/client/insert', 'admin_select','admin'));
    
		$header_html = $head->show(TRUE);
$header_html = str_replace(array("democrart", "democrArt", "Democrart", "DemocrArt"), array("expressaoartistica", "Expressão Artística", "Expressão Artística", "Expressão Artística"), $header_html);
echo $header_html;
?>
 
<body>

<div id="main">
     <?php include Config::getFolderView("parts/admin/header.php"); ?>
      
	  <div id="main_content">
	  
	  <div id="msgBox">
			<?php 
			
					//se for setado o return_result_vo ele pega a array de messages e exibe, independende se Ã© erro ou sucesso
					if(isset($HttpContentResult->return_result_vo) && count($HttpContentResult->return_result_vo->array_messages) > 0){
				    	foreach($HttpContentResult->return_result_vo->array_messages as $system_message){
			//	    		$system_message = $formData->translateMessage($system_message);
							?>
							<p class="success"><?php echo $system_message; ?></p>
							<?php
				    	}
				    }
			?>	  
	  </div>
	  			
		 <div id="box_right">
			<h1>Atualizar Endereço</h1>
			
			<div style="clear:both">
			<form name="frmCadastro" id="frmCadastro" class="frm" method="post" action="<?php echo Config::getRootPath("admin/client/update_address/user_id.".$HttpContentResult->user_id."/address_id.".$HttpContentResult->user_address_vo->id) ?>">
		
				<ul>					
					<li class="separador">ENDEREÇO</li>

					<li>
						<label>Nome / Apelido:</label>
						<input type="text" size="35" name="alias" id="alias" value="<?php echo $HttpContentResult->user_address_vo->alias ?>" class="rad" />
					</li>

					<li>
						<label for="cep">CEP:</label>
						<input type="text" size="10" name="zip_code" id="cep" value="<?php echo $HttpContentResult->user_address_vo->zip_code  ?>"/><label class="info">* Somente números</label>
					</li>
					
					<li>
						<label for="logradouro">Logradouro:</label>
						<input type="text" size="35" name="street" id="logradouro" value="<?php echo $HttpContentResult->user_address_vo->street  ?>"/>
						<div>
							<label for="numero">Nº:</label>
							<input type="text" size="10" name="number" id="numero" value="<?php echo $HttpContentResult->user_address_vo->number  ?>"/><label class="info">*</label>
						<div>
					</li>
					
					<li>
						<label for="bairro">Bairro:</label>
						<input type="text" size="30" name="neighborhood" id="bairro" value="<?php echo $HttpContentResult->user_address_vo->neighborhood  ?>"/><label class="info">*</label>
					</li>

					<li>
						<label for="complemento">Complemento:</label>
						<input type="text" size="30" name="complement" id="complemento" value="<?php echo $HttpContentResult->user_address_vo->complement  ?>"/><label class="info">*</label>
					</li>
					
					<li>
						<label for="cidade">Cidade:</label>
						<input type="text" size="20" name="city" id="cidade" value="<?php echo $HttpContentResult->user_address_vo->city ?>"/><label class="info">*</label>
					</li>
					
					<li>
						<label for="estado">Estado:</label>
						<input type="text" size="35" name="state" id="estado" value="<?php echo $HttpContentResult->user_address_vo->state ?>"/><label class="info">*</label>
					</li>

					<li>
						<label for="pais">País:</label>
						<input type="text" size="35" name="country" id="pais" value="<?php echo $HttpContentResult->user_address_vo->country ?>"/><label class="info">*</label>
					</li>


					<li>
						<label>Endereço Padrão:</label>
						<label class="info"><input type="radio" name="principal" value="1" id="sim" <?php echo ($HttpContentResult->user_address_vo->id == $HttpContentResult->user_detail_vo->address_id)?'checked="checked"':''; ?> class="rad" />Sim</label>
					</li>

					<li>
						<input type="submit" value="Enviar" id="enviar" class="btEnviar" />
					</li>
					
				</ul>
				
			</form>

			</div>
		
		</div>
					
			
			<!-- FIM DO QUADRO -->
	
	</div>
	
</div>

</body>
</html>
